package com.common.spider.spiderCzh;

import com.common.spider.spiderCzh.entity.WeatherAlarmType;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;

/**
 * 爬虫  （获取和风天气告警类型）
 *
 * @className: SpiderWeather
 * @author: junjie
 * @date: 2022-08-02 14:43
 */
public class SpiderWeather {
    private static String html = "<!DOCTYPE html>\n" +
            "<html lang=\"en\">\n" +
            "<head>\n" +
            "  <meta charset=\"UTF-8\">\n" +
            "  <title>\n" +
            "    <!DOCTYPE html>\n" +
            "    <html lang=\"zh\">\n" +
            "    <head>\n" +
            "    <meta charset=\"UTF-8\">\n" +
            "    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n" +
            "    <!-- title/description/etc... -->\n" +
            "    <title>预警信息 - RESOURCE | 和风天气开发平台</title>\n" +
            "  <meta name=\"description\" content=\"和风天气预警服务支持中国全球及多个国家和地区的气象预警服务，这里可以了解我们所支持的预警信息的详细说明，例如支持的国家和地区列表，预警等级和预警类型。\" />\n" +
            "  <link rel=\"canonical\" href=\"https://dev.qweather.com/docs/resource/warning-info/\" />\n" +
            "  <meta property=\"og:title\" content=\"预警信息 - RESOURCE\" />\n" +
            "  <meta property=\"og:locale\" content=\"zh\" />\n" +
            "  <meta property=\"og:locale:alternate\" content=\"en\" />\n" +
            "  <meta property=\"og:description\" content=\"和风天气预警服务支持中国全球及多个国家和地区的气象预警服务，这里可以了解我们所支持的预警信息的详细说明，例如支持的国家和地区列表，预警等级和预警类型。\" />\n" +
            "  <meta property=\"og:url\" content=\"https://dev.qweather.com/docs/resource/warning-info/\" />\n" +
            "  <meta property=\"og:site_name\" content=\"和风天气开发平台\" />\n" +
            "  <meta property=\"og:type\" content=\"Article\" />\n" +
            "  <meta property=\"article:modified_time\" content=\"2022-05-30T20:08:05+08:00\" />\n" +
            "  <script type=\"application/ld+json\">\n" +
            "    {\n" +
            "      \"@context\": \"https://schema.org\",\n" +
            "      \"@type\": \"Article\",\n" +
            "      \"headline\": \"预警信息 - RESOURCE\",\n" +
            "      \"dateModified\":\"2022-05-30T20:08:05+08:00\",\n" +
            "      \"description\": \"和风天气预警服务支持中国全球及多个国家和地区的气象预警服务，这里可以了解我们所支持的预警信息的详细说明，例如支持的国家和地区列表，预警等级和预警类型。\",\n" +
            "      \"url\":\"https://dev.qweather.com/docs/resource/warning-info/\",\n" +
            "      \"publisher\":{\n" +
            "        \"@type\":\"Organization\",\n" +
            "        \"name\": \"和风天气开发平台\",\n" +
            "        \"logo\":{\n" +
            "          \"@type\":\"ImageObject\",\n" +
            "          \"url\":\"https://cdn.qweather.com/media/qw-logo-s-dark-800.png\"\n" +
            "        }\n" +
            "      }\n" +
            "    }\n" +
            "  </script>\n" +
            "  <!-- hreflang for current page -->\n" +
            "  <link rel=\"alternate\" hreflang=\"en\" href=\"https://dev.qweather.com/en/docs/resource/warning-info/\" />\n" +
            "  <link rel=\"alternate\" hreflang=\"zh\" href=\"https://dev.qweather.com/docs/resource/warning-info/\" />\n" +
            "  <!-- QWeather APP AppStore -->\n" +
            "  <meta name=\"apple-itunes-app\" content=\"app-id=1461458147, app-argument=weather\" />\n" +
            "  <!-- favicons -->\n" +
            "  <link rel=\"icon\" type=\"image/svg+xml\" href=\"/assets/favicon/favicon.svg?20210227\">\n" +
            "  <link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/assets/favicon/apple-touch-icon.png?20210227\">\n" +
            "  <link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/assets/favicon/favicon-32x32.png?20210227\">\n" +
            "  <link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/assets/favicon/favicon-16x16.png?20210227\">\n" +
            "  <link rel=\"mask-icon\" href=\"/assets/favicon/safari-pinned-tab.svg?20210227\" color=\"#1a2226\">\n" +
            "  <link rel=\"manifest\" href=\"/assets/favicon/site.webmanifest?20210227\">\n" +
            "  <meta name=\"msapplication-config\" content=\"/assets/favicon/browserconfig.xml?20210227\">\n" +
            "  <meta name=\"theme-color\" content=\"#1a2226\">\n" +
            "  <!-- main style -->\n" +
            "  <link rel=\"preload\" href=\"/assets/css/style.css?20210721\" as=\"style\" />\n" +
            "  <link rel=\"stylesheet\" href=\"/assets/css/style.css?20210721\" />\n" +
            "  <!--[if lt IE 9]>\n" +
            "  <script src=\"/assets/js/html5shiv.min.js\" type=\"text/javascript\"></script>\n" +
            "  <script src=\"/assets/js/respond.min.js\" type=\"text/javascript\"></script>\n" +
            "  <script src=\"/assets/js/rem.js\" type=\"text/javascript\"></script>\n" +
            "  <![endif]-->\n" +
            "  <!-- webmaster_verifications -->\n" +
            "  <meta name=\"google-site-verification\" content=\"WFu5M6w9XiYrf3hgUBLxCA1Jrgb_CWTzXTPycVIqngg\" />\n" +
            "  <meta name=\"msvalidate.01\" content=\"EDFBFE217D2B905D82BE1D5A1BC9AB28\" />\n" +
            "  <meta name=\"baidu-site-verification\" content=\"code-emsTMHxQLF\" />\n" +
            "\n" +
            "  <!-- Google Tag Manager -->\n" +
            "  <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\n" +
            "      new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n" +
            "    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n" +
            "    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n" +
            "  })(window,document,'script','dataLayer','GTM-NZFFWJH');</script>\n" +
            "  <!-- End Google Tag Manager -->\n" +
            "</head>\n" +
            "<body>\n" +
            "\n" +
            "<nav class=\"qw-navbar\">\n" +
            "  <div class=\"container\">\n" +
            "    <div class=\"navbar-brand hidden-xs hidden-sm\">\n" +
            "      <a href=\"/\">\n" +
            "        <img src=\"/assets/images/logo-s-dark.png\" alt=\"和风天气开发平台\"><span>和风天气开发平台</span>\n" +
            "      </a>\n" +
            "    </div>\n" +
            "    <div class=\"go-left  hidden-xs hidden-sm\">\n" +
            "      <ul class=\"navbar-item site-item\">\n" +
            "        <li>\n" +
            "          <a href=\"/\">首页</a>\n" +
            "        </li>\n" +
            "        <li class=\"active\">\n" +
            "          <a href=\"/docs/\">开发文档</a>\n" +
            "        </li>\n" +
            "        <li>\n" +
            "          <a href=\"https://icons.qweather.com\">图标</a>\n" +
            "        </li>\n" +
            "        <li>\n" +
            "          <a href=\"https://widget.qweather.com\">插件</a>\n" +
            "        </li>\n" +
            "        <li>\n" +
            "          <a href=\"/help/general/\">帮助</a>\n" +
            "        </li>\n" +
            "        <li>\n" +
            "          <a href=\"/price/\">价格</a>\n" +
            "        </li>\n" +
            "      </ul>\n" +
            "    </div>\n" +
            "    <div class=\"go-right hidden-xs hidden-sm\">\n" +
            "      <ul class=\"navbar-item site-sub-item\">\n" +
            "        <li class=\"qw-lang\">\n" +
            "          <a href=\"/en/docs/resource/warning-info/\">EN</a>\n" +
            "          <a class=\"active\" href=\"/docs/resource/warning-info/\">中</a>\n" +
            "        </li>\n" +
            "        <li class=\"console\">\n" +
            "          <a href=\"https://id.qweather.com/#/login?redirect=https://console.qweather.com\" target=\"_blank\" rel=\"noopener noreferrer\">控制台</a>\n" +
            "        </li>\n" +
            "        <li class=\"login\">\n" +
            "          <a href=\"https://id.qweather.com/#/register?redirect=https://console.qweather.com\" target=\"_blank\" rel=\"noopener noreferrer\">注册</a>\n" +
            "        </li>\n" +
            "      </ul>\n" +
            "    </div>\n" +
            "\n" +
            "    <!-- for mobile  -->\n" +
            "    <div class=\"navbar-brand-mobile visible-xs-block visible-sm-block\">\n" +
            "      <a href=\"/\">\n" +
            "        <img src=\"/assets/images/logo-s-dark.png\" alt=\"和风天气开发平台\"><span>和风天气开发平台</span>\n" +
            "      </a>\n" +
            "      <span class=\"qw-lang\">\n" +
            "  <a href=\"/en/docs/resource/warning-info/\">EN</a>\n" +
            "  <a class=\"active\" href=\"/docs/resource/warning-info/\">中</a>\n" +
            "      </span>\n" +
            "    </div>\n" +
            "    <div class=\"navbar-item-mobile visible-xs-block visible-sm-block\">\n" +
            "      <ul>\n" +
            "        <li>\n" +
            "          <a href=\"/\">首页</a>\n" +
            "        </li>\n" +
            "        <li class=\"active\">\n" +
            "          <a href=\"/docs/\">开发文档</a>\n" +
            "        </li>\n" +
            "        <li>\n" +
            "          <a href=\"https://icons.qweather.com\">图标</a>\n" +
            "        </li>\n" +
            "        <li>\n" +
            "          <a href=\"https://widget.qweather.com\">插件</a>\n" +
            "        </li>\n" +
            "        <li>\n" +
            "          <a href=\"/help/general/\">帮助</a>\n" +
            "        </li>\n" +
            "        <li>\n" +
            "          <a href=\"/price/\">价格</a>\n" +
            "        </li>\n" +
            "        <li class=\"login\">\n" +
            "          <a href=\"https://id.qweather.com/#/register?redirect=https://console.qweather.com\" target=\"_blank\" rel=\"noopener noreferrer\">登录</a>\n" +
            "        </li>\n" +
            "      </ul>\n" +
            "    </div>\n" +
            "  </div>\n" +
            "</nav>\n" +
            "\n" +
            "<!-- for pc -->\n" +
            "<nav class=\"qw-navbar sticky-top doc-bc-nav hidden-xs\">\n" +
            "  <div class=\"container\">\n" +
            "    <ul class=\"navbar-item doc-bc-item\">\n" +
            "      <li>\n" +
            "        <a href=\"/docs/\">开发文档</a>\n" +
            "      </li>\n" +
            "      <li>\n" +
            "        <a href=\"/docs/resource/\">实用资料</a>\n" +
            "      </li>\n" +
            "      <li class=\"active\">\n" +
            "        <a href=\"/docs/resource/warning-info/\">预警信息</a>\n" +
            "      </li>\n" +
            "    </ul>\n" +
            "  </div>\n" +
            "</nav>\n" +
            "\n" +
            "<!-- for mobile -->\n" +
            "<nav class=\"doc-bc-nav-mobile sticky-top visible-xs-block\">\n" +
            "  <div class=\"container\">\n" +
            "    <select onchange=\"if (this.value) window.location.href=this.value\">\n" +
            "      <option value=\"\">开发文档目录</option>\n" +
            "      <optgroup label=\"Web API\">\n" +
            "        <option value=\"/docs/api/geo/\">GeoAPI</option>\n" +
            "        <option value=\"/docs/api/weather/\">天气API</option>\n" +
            "        <option value=\"/docs/api/grid-weather/\">格点天气</option>\n" +
            "        <option value=\"/docs/api/indices/\">天气生活指数</option>\n" +
            "        <option value=\"/docs/api/warning/\">灾害预警</option>\n" +
            "        <option value=\"/docs/api/air/\">空气质量</option>\n" +
            "        <option value=\"/docs/api/historical/\">历史天气和空气质量</option>\n" +
            "        <option value=\"/docs/api/tropical/\">热带气旋（台风）</option>\n" +
            "        <option value=\"/docs/api/astronomy/\">太阳和月亮</option>\n" +
            "        <option value=\"/docs/api/ocean/\">潮汐和潮流</option>\n" +
            "      </optgroup>\n" +
            "      <optgroup label=\"iOS SDK\">\n" +
            "        <option value=\"/docs/ios-sdk/ios-configuration/\">\n" +
            "          初始配置\n" +
            "        </option>\n" +
            "        <option value=\"/docs/ios-sdk/ios-geo/\">\n" +
            "          GeoAPI\n" +
            "        </option>\n" +
            "        <option value=\"/docs/ios-sdk/ios-weather/\">\n" +
            "          实时天气和预报\n" +
            "        </option>\n" +
            "        <option value=\"/docs/ios-sdk/ios-indices/\">\n" +
            "          天气生活指数\n" +
            "        </option>\n" +
            "        <option value=\"/docs/ios-sdk/ios-warning/\">\n" +
            "          天气灾害预警\n" +
            "        </option>\n" +
            "        <option value=\"/docs/ios-sdk/ios-air/\">\n" +
            "          实时空气质量和预报\n" +
            "        </option>\n" +
            "        <option value=\"/docs/ios-sdk/ios-historical/\">\n" +
            "          历史天气和空气质量\n" +
            "        </option>\n" +
            "        <option value=\"/docs/ios-sdk/ios-astronomy/\">\n" +
            "          太阳和月亮\n" +
            "        </option>\n" +
            "        <option value=\"/docs/ios-sdk/ios-ocean/\">\n" +
            "          潮汐和潮流\n" +
            "        </option>\n" +
            "        <option value=\"/docs/ios-sdk/ios-tropical/\">\n" +
            "          热带气旋（台风）\n" +
            "        </option>\n" +
            "      </optgroup>\n" +
            "      <optgroup label=\"Android SDK\">\n" +
            "        <option value=\"/docs/android-sdk/android-configuration/\">\n" +
            "          初始配置\n" +
            "        </option>\n" +
            "        <option value=\"/docs/android-sdk/android-geo/\">\n" +
            "          GeoAPI\n" +
            "        </option>\n" +
            "        <option value=\"/docs/android-sdk/android-weather/\">\n" +
            "          实时天气和预报\n" +
            "        </option>\n" +
            "        <option value=\"/docs/android-sdk/android-indices/\">\n" +
            "          天气生活指数\n" +
            "        </option>\n" +
            "        <option value=\"/docs/android-sdk/android-warning/\">\n" +
            "          天气灾害预警\n" +
            "        </option>\n" +
            "        <option value=\"/docs/android-sdk/android-air/\">\n" +
            "          空气质量\n" +
            "        </option>\n" +
            "        <option value=\"/docs/android-sdk/android-historical/\">\n" +
            "          历史天气和空气质量\n" +
            "        </option>\n" +
            "        <option value=\"/docs/android-sdk/android-astronomy/\">\n" +
            "          太阳和月亮\n" +
            "        </option>\n" +
            "        <option value=\"/docs/android-sdk/android-ocean/\">\n" +
            "          潮汐和潮流\n" +
            "        </option>\n" +
            "        <option value=\"/docs/android-sdk/android-tropical/\">\n" +
            "          热带气旋（台风）\n" +
            "        </option>\n" +
            "      </optgroup>\n" +
            "      <optgroup label=\"Widget\">\n" +
            "        <option value=\"/docs/widget/standard-widget/\">\n" +
            "          网页标准插件\n" +
            "        </option>\n" +
            "        <option value=\"/docs/widget/simple-widget/\">\n" +
            "          网页简约插件\n" +
            "        </option>\n" +
            "        <option value=\"/docs/widget/mobile-page-widget/\">\n" +
            "          天气H5插件/天气频道页\n" +
            "        </option>\n" +
            "        <option value=\"/docs/widget/widget-for-ios/\">\n" +
            "          iOS天气插件\n" +
            "        </option>\n" +
            "        <option value=\"/docs/widget/widget-for-android/\">\n" +
            "          Android天气插件\n" +
            "        </option>\n" +
            "      </optgroup>\n" +
            "      <optgroup label=\"Open Weather Plus\">\n" +
            "        <option value=\"/docs/owp/owp-for-ios/\">\n" +
            "          天气普拉斯-iOS\n" +
            "        </option>\n" +
            "        <option value=\"/docs/owp/owp-for-android/\">\n" +
            "          天气普拉斯 Android\n" +
            "        </option>\n" +
            "      </optgroup>\n" +
            "    </select>\n" +
            "  </div>\n" +
            "</nav>\n" +
            "\n" +
            "\n" +
            "\n" +
            "<div class=\"main-content\">\n" +
            "  <div class=\"container\">\n" +
            "    <div class=\"row\">\n" +
            "      <div class=\"col-xs-12 col-sm-12 col-md-9\">\n" +
            "        <article>\n" +
            "\n" +
            "          <section class=\"article-headline\">\n" +
            "            <div class=\"edit-this-docs go-right hidden-sm hidden-xs\">\n" +
            "              <a href=\"https://github.com/qwd/dev-site/edit/master/_docs_zh/resource/warning-info.md\" target=\"_blank\" rel=\"noopener noreferrer\"><i class=\"ifq-pencil\"></i>&nbsp;编辑</a>\n" +
            "            </div>\n" +
            "            <h1>预警信息</h1>\n" +
            "          </section>\n" +
            "          <section class=\"doc-content\">\n" +
            "            <p>和风天气预警服务支持中国及全球多个国家和地区的气象预警服务(<a href=\"/docs/api/warning/\">API</a>，<a href=\"/docs/ios-sdk/ios-warning/\">iOS SDK</a>，<a href=\"/docs/android-sdk/android-warning/\">Android SDK</a>)，这里可以了解我们所支持的预警信息的详细说明，例如支持的国家或地区列表，预警等级和预警类型。</p>\n" +
            "\n" +
            "            <blockquote class=\"bqwarning\">\n" +
            "              <p>天气预警的等级、类型、紧迫程度等信息有可能发生变化，包括新增、修改或删除，这些变化我们可能无法提前通知到你，<strong>因此你需要让你的程序更具有兼容性，避免在发生变化的时候导致错误出现！</strong></p>\n" +
            "\n" +
            "              <p>我们的建议是不要尝试枚举这些数值，或做其他形式的映射，而是直接输出到屏幕上。</p>\n" +
            "            </blockquote>\n" +
            "\n" +
            "            <blockquote>\n" +
            "              <p>天气预警不一定适用于多语言设置，当一条预警信息无法响应你的多语言设置时，我们会返回英文或当地语言的信息，而且这可能是混合的，即部分内容为英文，另一部分是本地语言。</p>\n" +
            "            </blockquote>\n" +
            "            <h2 id=\"supported-regions\">\n" +
            "\n" +
            "\n" +
            "              支持的国家或地区 <a href=\"#supported-regions\" class=\"anchor-link no-underline\" title=\"Permalink\"><i class=\"ifq-link-horizontal\"></i></a>\n" +
            "\n" +
            "\n" +
            "            </h2>\n" +
            "\n" +
            "\n" +
            "            <p>天气灾害预警并非适用于所有城市，我们将不断的扩展这些数据，目前和风天气预警服务支持的国家或地区如下：</p>\n" +
            "\n" +
            "            <blockquote>\n" +
            "              <p>天气预警基于各国政府部门的官方数据，当官方数据无法正常发布时，我们可能会临时下线遇到问题的国家。</p>\n" +
            "            </blockquote>\n" +
            "\n" +
            "            <blockquote>\n" +
            "              <p>你可以使用<code class=\"language-plaintext highlighter-rouge\">range</code>参数通过<a href=\"/docs/api/warning/weather-warning-city-list/\">预警城市列表</a>获取该国家的所有预警城市信息</p>\n" +
            "            </blockquote>\n" +
            "\n" +
            "            <table>\n" +
            "              <thead>\n" +
            "              <tr>\n" +
            "                <th>ISO 3166-1</th>\n" +
            "                <th>国家或地区</th>\n" +
            "              </tr>\n" +
            "              </thead>\n" +
            "              <tbody>\n" +
            "              <tr>\n" +
            "                <td>ar</td>\n" +
            "                <td>阿根廷</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>at</td>\n" +
            "                <td>奥地利</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>be</td>\n" +
            "                <td>比利时</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>br</td>\n" +
            "                <td>巴西</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>bg</td>\n" +
            "                <td>保加利亚</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>cn</td>\n" +
            "                <td>中国</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>hr</td>\n" +
            "                <td>克罗地亚</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>cy</td>\n" +
            "                <td>塞浦路斯</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>cz</td>\n" +
            "                <td>捷克</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>dk</td>\n" +
            "                <td>丹麦</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>ee</td>\n" +
            "                <td>爱沙尼亚</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>fi</td>\n" +
            "                <td>芬兰</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>fr</td>\n" +
            "                <td>法国</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>de</td>\n" +
            "                <td>德国</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>gr</td>\n" +
            "                <td>希腊</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>hk</td>\n" +
            "                <td>中国香港</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>hu</td>\n" +
            "                <td>匈牙利</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>is</td>\n" +
            "                <td>冰岛</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>in</td>\n" +
            "                <td>印度</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>ie</td>\n" +
            "                <td>爱尔兰</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>il</td>\n" +
            "                <td>以色列</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>it</td>\n" +
            "                <td>意大利</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>kw</td>\n" +
            "                <td>科威特</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>lv</td>\n" +
            "                <td>拉脱维亚</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>lt</td>\n" +
            "                <td>立陶宛</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>lu</td>\n" +
            "                <td>卢森堡</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>mo</td>\n" +
            "                <td>中国澳门</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>mt</td>\n" +
            "                <td>马耳他</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>md</td>\n" +
            "                <td>摩尔多瓦</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>me</td>\n" +
            "                <td>黑山</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>nl</td>\n" +
            "                <td>荷兰</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>mk</td>\n" +
            "                <td>北马其顿</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>no</td>\n" +
            "                <td>挪威</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>pl</td>\n" +
            "                <td>波兰</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>pt</td>\n" +
            "                <td>葡萄牙</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>ro</td>\n" +
            "                <td>罗马尼亚</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>ru</td>\n" +
            "                <td>俄罗斯</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>rs</td>\n" +
            "                <td>塞尔维亚</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>sk</td>\n" +
            "                <td>斯洛伐克</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>si</td>\n" +
            "                <td>斯洛文尼亚</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>za</td>\n" +
            "                <td>南非</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>es</td>\n" +
            "                <td>西班牙</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>se</td>\n" +
            "                <td>瑞典</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>ch</td>\n" +
            "                <td>瑞士</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>gb</td>\n" +
            "                <td>英国</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              </tbody>\n" +
            "            </table>\n" +
            "            <h2 id=\"status\">\n" +
            "\n" +
            "\n" +
            "              预警状态 <a href=\"#status\" class=\"anchor-link no-underline\" title=\"Permalink\"><i class=\"ifq-link-horizontal\"></i></a>\n" +
            "\n" +
            "\n" +
            "            </h2>\n" +
            "\n" +
            "\n" +
            "            <p><code class=\"language-plaintext highlighter-rouge\">warning.status</code> 代表当前预警信息的发布状态，包括：</p>\n" +
            "\n" +
            "            <ul>\n" +
            "              <li>Active - 当前预警处于激活状态</li>\n" +
            "              <li>Update - 当前预警是一次对之前指定预警信息的升级或修改</li>\n" +
            "              <li>Cancel - 由于各种原因取消之前指定预警信息的发布。该状态是一个预保留的值，你目前不能使用这个值去判断预警是否有效。</li>\n" +
            "            </ul>\n" +
            "            <h2 id=\"expiry-time\">\n" +
            "\n" +
            "\n" +
            "              过期时间 <a href=\"#expiry-time\" class=\"anchor-link no-underline\" title=\"Permalink\"><i class=\"ifq-link-horizontal\"></i></a>\n" +
            "\n" +
            "\n" +
            "            </h2>\n" +
            "\n" +
            "\n" +
            "            <blockquote>\n" +
            "              <p>一般预警信息的有效期不会超过48小时，因此如果预警信息中未能提供<code class=\"language-plaintext highlighter-rouge\">warning.endTime</code>，我们建议将这条预警信息的过期时间设置为从<code class=\"language-plaintext highlighter-rouge\">warning.startTime</code>开始后的24小时（我们也是这样做的）。</p>\n" +
            "            </blockquote>\n" +
            "\n" +
            "            <p>你可以根据<code class=\"language-plaintext highlighter-rouge\">warning.endTime</code>来预估一条预警信息的失效时间，或者当你更新数据的时候无法再获取当之前相同ID的预警信息时，代表这一条预警已经过期或失效。</p>\n" +
            "            <h2 id=\"level-deprecated\">\n" +
            "\n" +
            "\n" +
            "              预警等级（弃用） <a href=\"#level-deprecated\" class=\"anchor-link no-underline\" title=\"Permalink\"><i class=\"ifq-link-horizontal\"></i></a>\n" +
            "\n" +
            "\n" +
            "            </h2>\n" +
            "\n" +
            "\n" +
            "            <p><code class=\"language-plaintext highlighter-rouge\">warning.level</code>代表预警信息的等级。</p>\n" +
            "\n" +
            "            <blockquote class=\"bqwarning\">\n" +
            "              <p><strong>警告：</strong>目前该字段已弃用，使用<a href=\"/docs/resource/warning-info/#severity\">严重等级</a>和<a href=\"/docs/resource/warning-info/#severity-color\">严重等级颜色</a>替代。</p>\n" +
            "            </blockquote>\n" +
            "            <h2 id=\"severity\">\n" +
            "\n" +
            "\n" +
            "              严重等级 <a href=\"#severity\" class=\"anchor-link no-underline\" title=\"Permalink\"><i class=\"ifq-link-horizontal\"></i></a>\n" +
            "\n" +
            "\n" +
            "            </h2>\n" +
            "\n" +
            "\n" +
            "            <p><code class=\"language-plaintext highlighter-rouge\">warning.severity</code>表示预警事件所造成的影响强度。</p>\n" +
            "\n" +
            "            <p>不同国家和地区对预警严重等级有自己的的定义和规范，在科威特适用于Minor、Moderate、Severe和Extreme。对于巴西，适用于Moderate、Severe和Extreme。对于南非，适用于Minor、Moderate、Extreme和Unknown。对于澳大利亚适用于Cancel、None、Unknown、Standard、Minor、Moderate、Major、Severe和Extreme。对于其他国家适用于Unknown、Minor、Moderate、Severe和Extreme。</p>\n" +
            "\n" +
            "            <p>目前预警严重等级包括：</p>\n" +
            "\n" +
            "            <ul>\n" +
            "              <li>Cancel</li>\n" +
            "              <li>None</li>\n" +
            "              <li>Unknown</li>\n" +
            "              <li>Standard</li>\n" +
            "              <li>Minor</li>\n" +
            "              <li>Moderate</li>\n" +
            "              <li>Major</li>\n" +
            "              <li>Severe</li>\n" +
            "              <li>Extreme</li>\n" +
            "            </ul>\n" +
            "            <h2 id=\"severity-color\">\n" +
            "\n" +
            "\n" +
            "              严重等级颜色 <a href=\"#severity-color\" class=\"anchor-link no-underline\" title=\"Permalink\"><i class=\"ifq-link-horizontal\"></i></a>\n" +
            "\n" +
            "\n" +
            "            </h2>\n" +
            "\n" +
            "\n" +
            "            <p>对于<a href=\"/docs/resource/warning-info/#severity\">严重等级</a>，一些国家和地区的预警严重等级习惯采用颜色进行定义，我们将根据当地习惯提供严重等级所适用的颜色。</p>\n" +
            "\n" +
            "            <blockquote>\n" +
            "              <p><strong>注意：</strong>如果当地没有更适合的颜色，则返回为空。</p>\n" +
            "            </blockquote>\n" +
            "\n" +
            "            <p>目前预警严重等级颜色包括：</p>\n" +
            "\n" +
            "            <ul>\n" +
            "              <li>White</li>\n" +
            "              <li>Blue</li>\n" +
            "              <li>Green</li>\n" +
            "              <li>Yellow</li>\n" +
            "              <li>Orange</li>\n" +
            "              <li>Red</li>\n" +
            "              <li>Black</li>\n" +
            "            </ul>\n" +
            "            <h2 id=\"urgency\">\n" +
            "\n" +
            "\n" +
            "              紧迫程度 <a href=\"#urgency\" class=\"anchor-link no-underline\" title=\"Permalink\"><i class=\"ifq-link-horizontal\"></i></a>\n" +
            "\n" +
            "\n" +
            "            </h2>\n" +
            "\n" +
            "\n" +
            "            <blockquote>\n" +
            "              <p><strong>注意：</strong>这个字段在一些国家和地区不可用，或者与所列出的值不尽相同</p>\n" +
            "            </blockquote>\n" +
            "\n" +
            "            <p><code class=\"language-plaintext highlighter-rouge\">warning.urgency</code> 表示预警信息的紧迫性，包括：</p>\n" +
            "\n" +
            "            <ul>\n" +
            "              <li>Immediate</li>\n" +
            "              <li>Expected</li>\n" +
            "              <li>Future</li>\n" +
            "              <li>Past</li>\n" +
            "              <li>Unknown</li>\n" +
            "            </ul>\n" +
            "            <h2 id=\"certainty\">\n" +
            "\n" +
            "\n" +
            "              确定性 <a href=\"#certainty\" class=\"anchor-link no-underline\" title=\"Permalink\"><i class=\"ifq-link-horizontal\"></i></a>\n" +
            "\n" +
            "\n" +
            "            </h2>\n" +
            "\n" +
            "\n" +
            "            <blockquote>\n" +
            "              <p><strong>注意：</strong>这个字段在一些国家和地区不可用，或者与所列出的值不尽相同</p>\n" +
            "            </blockquote>\n" +
            "\n" +
            "            <p><code class=\"language-plaintext highlighter-rouge\">warning.certainty</code> 表示预警信息的确定性或可信度，包括：</p>\n" +
            "\n" +
            "            <ul>\n" +
            "              <li>Observed</li>\n" +
            "              <li>Likely</li>\n" +
            "              <li>Possible</li>\n" +
            "              <li>Unlikely</li>\n" +
            "              <li>Unknown</li>\n" +
            "            </ul>\n" +
            "            <h2 id=\"warning-type\">\n" +
            "\n" +
            "\n" +
            "              预警类型 <a href=\"#warning-type\" class=\"anchor-link no-underline\" title=\"Permalink\"><i class=\"ifq-link-horizontal\"></i></a>\n" +
            "\n" +
            "\n" +
            "            </h2>\n" +
            "\n" +
            "\n" +
            "            <p>和风天气根据各国官方气象部门的定义，提供了超过100种预警类型，这些类型并非适用于所有国家或地区。</p>\n" +
            "\n" +
            "            <p>我们提供了下列预警类型的图标，请参考<a href=\"https://icons.qweather.com/\">和风天气图标</a>。</p>\n" +
            "\n" +
            "            <blockquote class=\"bqwarning\">\n" +
            "              <p><strong>警告：</strong>Type（弃用）版将在2021年12月31日不再返回，而采用新的Type名称，请及时更新。</p>\n" +
            "            </blockquote>\n" +
            "\n" +
            "            <table class=\"spider\">\n" +
            "              <thead>\n" +
            "              <tr>\n" +
            "                <th>Type</th>\n" +
            "                <th>Type（弃用）</th>\n" +
            "                <th>TypeName</th>\n" +
            "              </tr>\n" +
            "              </thead>\n" +
            "              <tbody>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1001</td>\n" +
            "                <td>11B01</td>\n" +
            "                <td>台风</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1002</td>\n" +
            "                <td>11B02</td>\n" +
            "                <td>龙卷风</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1003</td>\n" +
            "                <td>11B03</td>\n" +
            "                <td>暴雨</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1004</td>\n" +
            "                <td>11B04</td>\n" +
            "                <td>暴雪</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1005</td>\n" +
            "                <td>11B05</td>\n" +
            "                <td>寒潮</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1006</td>\n" +
            "                <td>11B06</td>\n" +
            "                <td>大风</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1007</td>\n" +
            "                <td>11B07</td>\n" +
            "                <td>沙尘暴</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1008</td>\n" +
            "                <td>11B08</td>\n" +
            "                <td>低温冻害</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1009</td>\n" +
            "                <td>11B09</td>\n" +
            "                <td>高温</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1010</td>\n" +
            "                <td>11B10</td>\n" +
            "                <td>热浪</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1011</td>\n" +
            "                <td>11B11</td>\n" +
            "                <td>干热风</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1012</td>\n" +
            "                <td>11B12</td>\n" +
            "                <td>下击暴流</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1013</td>\n" +
            "                <td>11B13</td>\n" +
            "                <td>雪崩</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1014</td>\n" +
            "                <td>11B14</td>\n" +
            "                <td>雷电</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1015</td>\n" +
            "                <td>11B15</td>\n" +
            "                <td>冰雹</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1016</td>\n" +
            "                <td>11B16</td>\n" +
            "                <td>霜冻</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1017</td>\n" +
            "                <td>11B17</td>\n" +
            "                <td>大雾</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1018</td>\n" +
            "                <td>11B18</td>\n" +
            "                <td>低空风切变</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1019</td>\n" +
            "                <td>11B19</td>\n" +
            "                <td>霾</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1020</td>\n" +
            "                <td>11B20</td>\n" +
            "                <td>雷雨大风</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1021</td>\n" +
            "                <td>11B21</td>\n" +
            "                <td>道路结冰</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1022</td>\n" +
            "                <td>11B22</td>\n" +
            "                <td>干旱</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1023</td>\n" +
            "                <td>11B23</td>\n" +
            "                <td>海上大风</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1024</td>\n" +
            "                <td>11B24</td>\n" +
            "                <td>高温中暑</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1025</td>\n" +
            "                <td>11B25</td>\n" +
            "                <td>森林火险</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1026</td>\n" +
            "                <td>11B26</td>\n" +
            "                <td>草原火险</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1027</td>\n" +
            "                <td>11B27</td>\n" +
            "                <td>冰冻</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1028</td>\n" +
            "                <td>11B28</td>\n" +
            "                <td>空间天气</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1029</td>\n" +
            "                <td>11B29</td>\n" +
            "                <td>重污染</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1030</td>\n" +
            "                <td>11B30</td>\n" +
            "                <td>低温雨雪冰冻</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1031</td>\n" +
            "                <td>11B31</td>\n" +
            "                <td>强对流</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1032</td>\n" +
            "                <td>11B32</td>\n" +
            "                <td>臭氧</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1033</td>\n" +
            "                <td>11B33</td>\n" +
            "                <td>大雪</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1034</td>\n" +
            "                <td>11B34</td>\n" +
            "                <td>寒冷</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1035</td>\n" +
            "                <td>11B35</td>\n" +
            "                <td>连阴雨</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1036</td>\n" +
            "                <td>11B36</td>\n" +
            "                <td>渍涝风险</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1037</td>\n" +
            "                <td>11B37</td>\n" +
            "                <td>地质灾害气象风险</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1038</td>\n" +
            "                <td>11B38</td>\n" +
            "                <td>强降雨</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1039</td>\n" +
            "                <td>11B39</td>\n" +
            "                <td>强降温</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1040</td>\n" +
            "                <td>11B40</td>\n" +
            "                <td>雪灾</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1041</td>\n" +
            "                <td>11B41</td>\n" +
            "                <td>森林（草原）火险</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1042</td>\n" +
            "                <td>11B42</td>\n" +
            "                <td>医疗气象</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1043</td>\n" +
            "                <td>11B43</td>\n" +
            "                <td>雷暴</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1044</td>\n" +
            "                <td>11B44</td>\n" +
            "                <td>停课信号</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1045</td>\n" +
            "                <td>11B45</td>\n" +
            "                <td>停工信号</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1046</td>\n" +
            "                <td>11B46</td>\n" +
            "                <td>海上风险</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1047</td>\n" +
            "                <td>11B47</td>\n" +
            "                <td>春季沙尘天气</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1048</td>\n" +
            "                <td>11B48</td>\n" +
            "                <td>降温</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1049</td>\n" +
            "                <td>11B49</td>\n" +
            "                <td>台风暴雨</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1050</td>\n" +
            "                <td>11B50</td>\n" +
            "                <td>严寒</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1051</td>\n" +
            "                <td>11B51</td>\n" +
            "                <td>沙尘</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1052</td>\n" +
            "                <td>11B52</td>\n" +
            "                <td>海上雷雨大风</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1053</td>\n" +
            "                <td>11B53</td>\n" +
            "                <td>海上大雾</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1054</td>\n" +
            "                <td>11B54</td>\n" +
            "                <td>海上雷电</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1055</td>\n" +
            "                <td>11B55</td>\n" +
            "                <td>海上台风</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1056</td>\n" +
            "                <td>11B56</td>\n" +
            "                <td>低温</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1057</td>\n" +
            "                <td>11B57</td>\n" +
            "                <td>道路冰雪</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1058</td>\n" +
            "                <td>11B58</td>\n" +
            "                <td>雷暴大风</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1059</td>\n" +
            "                <td>11B59</td>\n" +
            "                <td>持续低温</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1061</td>\n" +
            "                <td>11B61</td>\n" +
            "                <td>浓浮沉</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1064</td>\n" +
            "                <td>11B64</td>\n" +
            "                <td>短时强降雨</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1101</td>\n" +
            "                <td></td>\n" +
            "                <td>洪水</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1302</td>\n" +
            "                <td></td>\n" +
            "                <td>泥石流</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1402</td>\n" +
            "                <td></td>\n" +
            "                <td>风暴潮</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1601</td>\n" +
            "                <td></td>\n" +
            "                <td>炎热</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1602</td>\n" +
            "                <td></td>\n" +
            "                <td>强烈季风信号</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1603</td>\n" +
            "                <td></td>\n" +
            "                <td>山泥倾泻</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1604</td>\n" +
            "                <td></td>\n" +
            "                <td>热带气旋</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1605</td>\n" +
            "                <td></td>\n" +
            "                <td>火灾危险</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1606</td>\n" +
            "                <td></td>\n" +
            "                <td>新界北部水浸特别报告</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>1607</td>\n" +
            "                <td></td>\n" +
            "                <td>寒冷天气</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2001</td>\n" +
            "                <td></td>\n" +
            "                <td>大风</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2002</td>\n" +
            "                <td></td>\n" +
            "                <td>强降雪和结冰</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2003</td>\n" +
            "                <td></td>\n" +
            "                <td>大雾</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2004</td>\n" +
            "                <td></td>\n" +
            "                <td>海岸风险</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2005</td>\n" +
            "                <td></td>\n" +
            "                <td>森林火险</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2006</td>\n" +
            "                <td></td>\n" +
            "                <td>雨</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2007</td>\n" +
            "                <td></td>\n" +
            "                <td>大雨洪水</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2008</td>\n" +
            "                <td></td>\n" +
            "                <td>冻雨和结冰</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2009</td>\n" +
            "                <td></td>\n" +
            "                <td>地面霜</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2010</td>\n" +
            "                <td></td>\n" +
            "                <td>扬尘风</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2011</td>\n" +
            "                <td></td>\n" +
            "                <td>强地面风</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2012</td>\n" +
            "                <td></td>\n" +
            "                <td>炎热</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2013</td>\n" +
            "                <td></td>\n" +
            "                <td>夜间炎热</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2014</td>\n" +
            "                <td></td>\n" +
            "                <td>寒冷</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2015</td>\n" +
            "                <td></td>\n" +
            "                <td>雷暴和闪电</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2016</td>\n" +
            "                <td></td>\n" +
            "                <td>冰雹风暴</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2017</td>\n" +
            "                <td></td>\n" +
            "                <td>海况风险</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2018</td>\n" +
            "                <td></td>\n" +
            "                <td>渔业风险</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2019</td>\n" +
            "                <td></td>\n" +
            "                <td>低湿度</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2020</td>\n" +
            "                <td></td>\n" +
            "                <td>累计降水风险</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2021</td>\n" +
            "                <td></td>\n" +
            "                <td>冲浪风险</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2022</td>\n" +
            "                <td></td>\n" +
            "                <td>海上大风</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2023</td>\n" +
            "                <td></td>\n" +
            "                <td>道路天气风险</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2024</td>\n" +
            "                <td></td>\n" +
            "                <td>雷雨</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2025</td>\n" +
            "                <td></td>\n" +
            "                <td>雷雨大雾</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2026</td>\n" +
            "                <td></td>\n" +
            "                <td>破坏性大风</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2027</td>\n" +
            "                <td></td>\n" +
            "                <td>草原火灾条件</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2028</td>\n" +
            "                <td></td>\n" +
            "                <td>天气预警建议</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2052</td>\n" +
            "                <td></td>\n" +
            "                <td>大雪</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2053</td>\n" +
            "                <td></td>\n" +
            "                <td>Zonda Wind</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>2054</td>\n" +
            "                <td></td>\n" +
            "                <td>风暴</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>9998</td>\n" +
            "                <td></td>\n" +
            "                <td>天气预警</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              <tr>\n" +
            "                <td>9999</td>\n" +
            "                <td>11B99</td>\n" +
            "                <td>其他</td>\n" +
            "              </tr>\n" +
            "\n" +
            "              </tbody>\n" +
            "            </table>\n" +
            "\n" +
            "          </section>\n" +
            "        </article>\n" +
            "      </div>\n" +
            "\n" +
            "      <div class=\"col-md-3 hidden-sm hidden-xs\">\n" +
            "        <aside>\n" +
            "          <h4>本页导航</h4>\n" +
            "          <ul><li><a href=\"#supported-regions\">支持的国家或地区</a></li><li><a href=\"#status\">预警状态</a></li><li><a href=\"#expiry-time\">过期时间</a></li><li><a href=\"#level-deprecated\">预警等级（弃用）</a></li><li><a href=\"#severity\">严重等级</a></li><li><a href=\"#severity-color\">严重等级颜色</a></li><li><a href=\"#urgency\">紧迫程度</a></li><li><a href=\"#certainty\">确定性</a></li><li><a href=\"#warning-type\">预警类型</a></li></ul>\n" +
            "\n" +
            "        </aside>\n" +
            "      </div>\n" +
            "\n" +
            "    </div>\n" +
            "  </div>\n" +
            "</div>\n" +
            "<footer>\n" +
            "  <div class=\"footer-content\">\n" +
            "    <div class=\"container\">\n" +
            "      <div class=\"row\">\n" +
            "        <div class=\"col-xs-12 col-sm-12 col-md-5 col-lg-6\">\n" +
            "          <section class=\"left\">\n" +
            "            <div class=\"brand\">\n" +
            "              <a href=\"https://dev.qweather.com\">\n" +
            "                <img src=\"/assets/images/logo-s-light.png\" width=\"30\" alt=\"QWeather Logo\"/><h3>和风天气开发平台</h3>\n" +
            "              </a>\n" +
            "            </div>\n" +
            "            <div class=\"subtitle\">\n" +
            "              一个简单 · 高效 · 强大的天气数据服务\n" +
            "            </div>\n" +
            "            <div class=\"goto-qw no-underline\">\n" +
            "              <a href=\"https://www.qweather.com\" target=\"_blank\" role=\"button\" rel=\"noopener noreferrer\">查询更多天气？访问和风天气</a>\n" +
            "            </div>\n" +
            "          </section>\n" +
            "        </div>\n" +
            "        <div class=\"col-xs-12 col-sm-12 col-md-7 col-lg-6\">\n" +
            "          <section class=\"right\">\n" +
            "            <div class=\"row\">\n" +
            "              <div class=\" col-xs-5 col-sm-4 col-md-5\">\n" +
            "                <h3>开发文档</h3>\n" +
            "                <ul>\n" +
            "                  <li><a href=\"/docs/api/\">API开发文档</a></li>\n" +
            "                  <li><a href=\"/docs/ios-sdk/\">iOS SDK</a></li>\n" +
            "                  <li><a href=\"/docs/android-sdk/\">Android SDK</a></li>\n" +
            "                  <li><a href=\"/docs/widget/\">天气插件</a></li>\n" +
            "                  <li><a href=\"/docs/owp/\">天气普拉斯</a></li></ul>\n" +
            "              </div>\n" +
            "              <div class=\"col-xs-3 col-sm-4 col-md-3\">\n" +
            "                <h3>帮助</h3>\n" +
            "                <ul>\n" +
            "                  <li><a href=\"/help/general/\">一般问题</a></li>\n" +
            "                  <li><a href=\"/help/buy/\">购买</a></li>\n" +
            "                  <li><a href=\"/help/data/\">数据产品</a></li>\n" +
            "                  <li><a href=\"/help/account/\">用户账号</a></li>\n" +
            "                </ul>\n" +
            "              </div>\n" +
            "              <div class=\"col-xs-4 col-sm-4 col-md-4\">\n" +
            "                <h3>更多</h3>\n" +
            "                <ul>\n" +
            "                  <li><a href=\"https://www.qweather.com/app/\" target=\"_blank\" rel=\"noopener noreferrer\">下载APP</a></li>\n" +
            "                  <li><a href=\"https://www.qweather.com/contact\" target=\"_blank\" rel=\"noopener noreferrer\" >联系</a></li>\n" +
            "                  <li><a href=\"https://www.qweather.com/terms/developers-tos\" target=\"_blank\" rel=\"noopener noreferrer\" >使用条款</a></li>\n" +
            "                  <li><a href=\"https://www.qweather.com/terms/privacy\" target=\"_blank\" rel=\"noopener noreferrer\" >隐私政策</a></li>\n" +
            "                  <li><a href=\"https://www.qweather.com/terms/disclaimer\" target=\"_blank\" rel=\"noopener noreferrer\" >免责声明</a></li>\n" +
            "                </ul>\n" +
            "              </div>\n" +
            "            </div>\n" +
            "          </section>\n" +
            "        </div>\n" +
            "      </div>\n" +
            "    </div>\n" +
            "  </div>\n" +
            "  <div class=\"footer-copyright\">\n" +
            "    <div class=\"container\">\n" +
            "      <div class=\"row\">\n" +
            "        <div class=\"col-xs-12 col-sm-12 col-md-6\">&copy; 2022 <a href=\"https://www.qweather.com\" target=\"_blank\" rel=\"noopener noreferrer\">QWeather</a> 本站由<a href=\"https://jekyllrb.com/\" target=\"_blank\" rel=\"noopener noreferrer\">Jekyll</a>驱动运行在<a href=\"https://github.com/qwd\" target=\"_blank\" rel=\"noopener noreferrer\">Github</a></div>\n" +
            "        <div class=\"col-xs-12 col-sm-12 col-md-6 text-right\"><a href=https://beian.miit.gov.cn target=\"_blank\" rel=\"noopener noreferrer\">京ICP备15048401号-11</a> &nbsp; <a href=http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010502042548 target=\"_blank\" rel=\"noopener noreferrer\">京公网安备11010502042548号</a></div>\n" +
            "      </div>\n" +
            "    </div>\n" +
            "  </div>\n" +
            "</footer>\n" +
            "</body>\n" +
            "\n" +
            "</html>\n" +
            "</title>\n" +
            "</head>\n" +
            "<body>\n" +
            "\n" +
            "</body>\n" +
            "</html>\n";

    public static void main(String[] args) {
        parseHtml(html);
    }

    /**
     * 解析html
     */
    public static void parseHtml(String html) {
        //装载 需要收集的数据 容器
        WeatherAlarmType weatherAlarmType = new WeatherAlarmType();

        //jsoup读取html源码字符串
        Document document = Jsoup.parse(html);
        //System.out.println(html);
        //解析
        Elements name = document.select("table[class=spider]").select("tbody").select("td");

        List<String> dataList = new ArrayList<>();
        dataList.add("1");//0
        dataList.add("2");//1
        dataList.add("3");//2

        List<WeatherAlarmType> collect = new ArrayList<>();
        //商品名称名称
        for (Element element : name) {

            String nameData = element.text();
            //System.out.println("tr:"+nameData);
            dataList.add(nameData);
        }

        for (int i = 3; i < dataList.size(); i++) {
//            System.out.println(dataList.get(i) +" :  "+ i%3);
            WeatherAlarmType weatherAlarm = new WeatherAlarmType();
            if (i % 3 == 0) {
                System.out.println(dataList.get(i + 2));
                weatherAlarm.setWarningType(dataList.get(i));
                weatherAlarm.setWarningName(dataList.get(i + 2));
                try {
                    openSqlSession(weatherAlarm);
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }

        }


    }

    /**
     * sql会话 用于sql的事务操作。传入所需的实体
     */
    public static void openSqlSession(WeatherAlarmType weatherAlarmType) throws IOException {
        String resource = "Mybatis-config.xml";
        InputStream inputStream = Resources.getResourceAsStream(resource);
        SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
        SqlSession session = sqlSessionFactory.openSession();
        int result = session.insert("insertType", weatherAlarmType);
        System.out.println("result:" + result);

        //提交事务
        session.commit();
        session.close();
    }

}

